/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ruteador.control.geneticAlgorithms;

import java.util.Comparator;

/**
 *
 * @author jorgeorm
 */
public class ComparadorCromosomaTSP implements Comparator<CromosomaTSP> {

    @Override
    public int compare(CromosomaTSP o1, CromosomaTSP o2) {
        if(o1.getAptitud() < o2.getAptitud()){
            return 1;
        }else if(o1.getAptitud() > o2.getAptitud()){
            return -1;
        }else {
            return 0;
        }
    }
    
    
}
